CrunchDir v1.26 (05.04.98) ---------------------------- Users manual -------------- =========================================================================== 0. Contents --------------------------------------------------------------------------- 1. Preface and Disclaimer 2. What's CrunchDir 3. System requirements 4. Installation 5. Arguments 6. Author 7. Greets =========================================================================== 1. Preface and Disclaimer --------------------------------------------------------------------------- This program and all files in this archive are © 1997/98 by Thomas Knuppe. They can be freely copied as long as the archive and all it's containing files are unmodified. I am not responsible for any damage which accur during or after the use of this program. The program was written with Amiga_E on an Amiga A4000/030 with OS 3.1 and was testet on an A4000 (OS3.1) and A3000T (OS2.04). Nevertheless: Please contact me if an error accurs. =========================================================================== 2. What's CrunchDir --------------------------------------------------------------------------- I wrote CrunchDir, because my BBS-System doesn't allow to manage binary filebases on their contents or date. CrunchDir scans the given directory recursively and deletes all files which are older than given days from the actual date. =========================================================================== 3. System requirements --------------------------------------------------------------------------- This program needs only an AMIGA with OS2.04 and a 68k CPU (any better system should also be fine :-) ) CrunchDir runs on two BBS-Systems every day and doesn't hurt anyone ;-) =========================================================================== 4. Installation --------------------------------------------------------------------------- The installation is as easy as possible. Just copy the program into your C: directory or whereever you want. Now, wipe the sweat from your forehead :-) =========================================================================== 5. Arguments --------------------------------------------------------------------------- Template : DIR/A,PATTERN,DAYS=D/K/N,LOGFILE=LOG/K,NOTIME/S,ADDLOG/S: DIR/A : The directory to be cleaned. The program scans this directory recursively ! This argument has to be given ! If an empty string ("") was given the program scans in the current directory ! PATTERN : An AmigaDOS-Pattern to take influence on the filenames to check. E.g. "(b#?)" check only files which begin with a "b". Caution : The pattern is case-sensitive ! If this argument is not given the program uses "(#?)" as pattern which means that all files will be checked. AmigaDOS-like you can also give a negative pattern (e.g. "~(#?.txt)" ). DAYS=D : With this argument you give the amount of days which will be subtracted from the actual date to define the age of the files to be deleted. It sounds complicated but it's easy. Example : Only files which are older than 20 days shall be deleted: D=20 This argument is a so called KEYWORD. It has to be given, too. Examples : DAYS=10 , D 5 , D=70 If this argument is not used or if the amount of days overrun the actual date the program uses a preset of 30 days ! LOGFILE=LOG : This argument can be used to generate a logfile were all actions of the program will be mentioned. You have to give a filename ! Example: LOG="RAM:CD-LOG.TXT" While the program runs it will also generate a temporary file in the logical directory "T:". This file will be deleted after the use of CrunchDir. The program adds a comment to the logfile that contains the amount of deleted files and errors. NOTIME/S : With this arg you can switch the time off. No ! The time is still running ;-) It means that the datetime of the file and the actual day is not used for the check. With this switch CrunchDir only deletes Files which are really x days old. ADDLOG/S : This argument is to add the logfile to an existing logfile. This will be done by the last-in-first-out - principle. The logs on top of the file are the newest. Each log-item has it's own header. The Filenote (see also the LOGFILE-argument) contains only informations about the _last_ run of CrunchDir ! Example program-call : Crunchdir Files:Stuff ~(BOARDINFO#?) D=2 LOGFILE T:Crunchdir.log This call would delete all Files in the cirectory "Files:Stuff" (and lower directorys) which are older than 2 days except of files which begin with the term "BOARDINFO". Also a logfile with the name "Crunchdir.log" will be generated on the logical device T: . The time of the files to be checked and the time of the actual day will be used for the check. You can ignore the Time by the switch NOTINE/S (see above) ATTENTION ! The program only deletes files which are deleteable ! This means that the protection-bits of the files are not changed by the program. If a file is protected against deletion it will not be deleted (therefore the protection-bits were made :-) ). An error-message will only occur if a logfile is generated. =========================================================================== 6. Author --------------------------------------------------------------------------- This program and the manuals were written by Thomas 'Shadow' Knuppe, Berlin, Germany I am reachable under the following addresses : E-Mail : EsHaDe@gmx.de Home : http://home.pages.de/~shd IRC : 'sHD' or 'EsHaDe' on IRCNet FAX : +49 (0)30 667 09 543 BBS : Outside world - +49 (0)30 667 09 150 X.75 667 09 151 v34+ 667 09 543 v32b/ZyX +FAX [AMMS 3] 667 09 544 v32b =========================================================================== 7. Regards --------------------------------------------------------------------------- I wish to thank the following people... Till 'MacGyver' Klöpping - Without your routines this program would not exist :-) Ronny 'Cannon' Schulz [IDP!] - for the best tools you wrote for AMMS for AMMS. Roman 'Galax-e' Harneit - for all the things we managed together in 1997 =) Rolf 'Digi-Bit' Müller - for the suggestions you made Enya - for the coding-music ;) Wouter van Oortmerssen - for one of the best programming- languages built for the Amiga. (Amiga_E) ===========================================================================